package com.jiang.admin.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jiang.admin.core.trigger.JobTriggerPoolHelper;
import com.jiang.admin.dao.JobInfoDao;
import com.jiang.common.ResultTO;

/**
 * job controller
 * 
 * @author jiangyougan 2018年12月2日 下午5:53:06
 *
 */
@Controller
@RequestMapping("/job")
public class JobController {

	@Resource
	private JobInfoDao jobInfoDao;

	@RequestMapping("/trigger")
	@ResponseBody
	public ResultTO<String> triggerJob(int id, String executorParam) {
		JobTriggerPoolHelper.trigger(id, executorParam);
		return ResultTO.success("");
	}

}
